<div style="text-align:center">
	<h2>{SITE_TITLE}</h2>
</div>
<form name="loginform" onsubmit="run_login();return false;">
<table cellpadding="0" cellspacing="5" border="0">
<tr>
	<td>{USERNAME}:</td>
    <td><input type="text" id="login_input_username" class="inputtext"  /></td>
</tr>
<tr>
	<td>{PASSWORD}:</td>
    <td><input type="password" id="login_input_password" class="inputtext" /></td>
</tr>
<tr>
	<td></td>
    <td>
		<input type="submit" value="{LOGIN}" class="bt" />&nbsp;
        <input type="button" onclick="close_popup()" class="bt" value="{CANCEL}" />
    </td>
</tr>
</table>
</form>
<br />
<br />
<div>
{REGISTER_SUGGEST}
</div>

<script>
function run_login()
{
	var name = $('#login_input_username').val();
	var pass = $('#login_input_password').val();
	$.post('login.php?module=ajax&m=login',{'name':name,'password':pass},login_callback,'json');
}

function login_callback(data)
{
	if (data.success)
	{
		window.location.reload();
		return;
	}
	if (data.msg)
	{
		alert(data.msg);
	}
	if (data.eval)
	{
		try{ eval(data.eval); } catch(e) { };
	}
}
</script>